# -*- coding: utf -8 -*-
# autor: teste
# data : teste
# obs: primeiro progama realizado em Python

# SO:16 / R1 : 13 / MC:13 / LP : x / FSI : 14 / RC2: 11 / IPC:X / BD1:14 / ES : x / EDA :x

l1 = [16.0,13.0,13.0,14.0,11.0,14.0,'x','x','x']



def media(l1):
	it = iter(l1)
	# = len(l1)
	soma = 0
	tamanho = 0
	for x in xrange(0, len(l1)):
		x1 = it.next()
		
		if type(x1) == float:
			soma += x1
			tamanho += 1
	return  soma/ tamanho
	
def media2(n,l1):
	x  = media(l1)
	
	tamanho = 0.0
	total_disc = len(l1)
	
	for z in xrange(0, len(l1)):
		if type(l1[z]) == str:
			tamanho+=1			
	
	return   (n * 2 * tamanho - (x * tamanho))/ 3
	
"""
def integral (f,a,b,N):
	
	
	dx = (b-a) / float(N)
	
	pontos = [f(a+dx*k) *dx for k in range(N)]	
	#pontos = map (lambda x : f(x) * dx, [a+k*dx for k in range(N)])
	return sum(pontos)

def f(x):
	return x*x

integral_1 = integral (f,0,1,100)
"""


#print integral_1

print media2(12 ,l1)
